import urllib
import urllib.request as request
proxy_addr={"https":"118.117.188.171:3256"}
def use_proxy(url):
    proxy=request.ProxyHandler(proxy_addr) # 伪装IP
    opener=urllib.request.build_opener(proxy,urllib.request.HTTPHandler)
    urllib.request.install_opener(opener)
    return urllib.request.urlopen(url).read().decode("utf-8","ignore")

data=use_proxy("https://www.baidu.com")
print(data)
